import request from '@/utils/request'
// 获取全部小说
export const getNovelApi = () => request.get(`/novel`)
// 创建小说
export const createNovelApi = ({ title, introduction, categoryName }) =>
  request.post('/novel', { title, introduction, categoryName })
// 根据作品id查询小说
export const getNovelByIdApi = (id) => request.get(`/novel/${id}`)
// 修改小说
export const updateNovelApi = (id, { title, introduction, categoryName }) =>
  request.put(`/novel/${id}`, { title, introduction, categoryName })
